import request from "@/axios/request";
// 登录注册 验证码登录
export function getLogin(params) {
  return request({
    method: "POST",
    url: "/login/index",
    params,
  });
}

//密码登录
export function getLoginPassword(params) {
  return request({
    method: "POST",
    url: "/login/passwordLogin",
    params,
  });
}

// 获取手机验证码
export function getCode(params) {
  return request({
    method: "POST",
    url: "/login/getCode",
    params,
  });
}

// 忘记密码
export function getforgotPassword(params) {
  return request({
    method: "POST",
    url: "/login/forgotPassword",
    params,
  });
}

// 修改密码
export function EditchangePassword(params) {
  return request({
    method: "POST",
    url: "/login/changePassword",
    params,
  });
}

// 初次设置密码
export function EditsetPassword(params) {
  return request({
    method: "POST",
    url: "/login/setPassword",
    params,
  });
}

// 修改用户名
export function changeUsername(params) {
  return request({
    method: "POST",
    url: "/login/changeUsername",
    params,
  });
}

// 初次设置邮箱
export function setEmail(params) {
  return request({
    method: "POST",
    url: "/login/setEmail",
    params,
  });
}

//修改邮箱
export function changeEmail(params) {
  return request({
    method: "POST",
    url: "/login/changeEmail",
    params,
  });
}

// 更换手机号
export function changeTel(params) {
  return request({
    method: "POST",
    url: "/login/changeTel",
    params,
  });
}

// 更换手机号验证码
export function getCodeByTel(params) {
  return request({
    method: "POST",
    url: "/login/getCodeByTel",
    params,
  });
}

// 会员接口  levels/complete
export function GetVip(params) {
  return request({
    method: "GET",
    url: "/levels/complete",
    params,
  });
}
